/** @author Chris Howson & Steven Horsman */
class SolverType
{
	/**Determines the type of this object*/
	private char type;
	/**Determines the row number of this object*/
	private int row;
	/**Determines the column number of this object*/
	private int col;
	/**Determines the data vale of this object*/
	private double data;
	/**Stores a 2D array of SolverData objects*/
	private SolverData[][] solvedat;
	
	/**Empty Constructor*/
	public SolverType() {}
	
	/**Constructor*/
	public SolverType(char ga, int r, int c, double d, SolverData[][] sda)
	{
		this.type=ga;
		this.row=r;
		this.col=c;
		this.data=d;
		solvedat = new SolverData[9][9];
		if(sda != null)
		{
			for(int i=0;i<9;i++)
			{
				for(int j = 0;j<9;j++)
				{
					//System.out.println("(" + i+ "," + j + ") :" + sda[i][j].print());
					this.solvedat[i][j] = new SolverData(sda[i][j]);
					//System.out.println("adasd");
				}
	
			}
		}
	}
	
	/**Returns the column value set for this object*/
	public int getCol() {
		return col;
	}

	/**Sets the column value set for this object*/
	public void setCol(int col) {
		this.col = col;
	}

	/**Returns the data value set for this object*/
	public double getData() {
		return data;
	}

	/**Sets the column value set for this object*/
	public void setData(double data) {
		this.data = data;
	}

	/**Returns the SolverData field of this object*/
	public SolverData[][] getSolveDat() {
		return solvedat;
	}

	/**Sets the SolverData field of this object*/
	public void setSolveDat(SolverData[][] jim) {
		this.solvedat = jim;
	}

	/**Returns the row value set for this object*/
	public int getRow() {
		return row;
	}

	/**Sets the column value set for this object*/
	public void setRow(int row) {
		this.row = row;
	}

	/**Returns the type value set for this object*/
	public char getType() {
		return type;
	}

	/**Sets the type value set for this object*/
	public void setType(char type) {
		this.type = type;
	}

	/**Sets the row, column and data values to r, c, d as provided*/
	public void setST(int r, int c, double d)
	{
		this.row = r;
		this.col = c;
		this.data = d;
	}
	
	/**Prints to standard output the values of the object*/
	public String print(int i, int j)
	{
		String print = (type + ", (" + row + "," + col + ") = " + data + " =>" + solvedat[i][j].print());
		return print;
	}
}
